import request from '@/utils/request'

export const getPermissionList = () => {
  return request.get('/sys/permission')
}

export const addPermission = data => {
  return request.post('/sys/permission', data)
}

export const getPermission = id => {
  return request.get(`/sys/permission/${id}`)
}

export const editPermission = data => {
  return request.put(`/sys/permission/${data.id}`, data)
}

export const delPermission = id => {
  return request.delete(`/sys/permission/${id}`)
}
